<template>
  <div>
    御剑乘风来,除魔天地间!===vue3
    <h1 class="container">box</h1>
  </div>
</template>
           
<script>
// import * as  obj from 'vue'
import { onMounted, onBeforeMount } from 'vue'

export default {
  name: '',
  setup () {
    onMounted(() => {
      // 理解成v2:mounted
      // console.log('onMounted');
    })

    onBeforeMount(() => {
      // console.log('DOM渲染前', document.querySelector('.container'))
    })
    onMounted(() => {
      // console.log('DOM渲染后1', document.querySelector('.container'))
    })
    return {}
  }
}
</script>
<style lang='less'  scoped>
</style>